<!DOCTYPE html>
<html>

<head>
	<title>我的资料</title>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="stylesheet" href="/js/plugins/bootstrap-4.1.1-dist/css/bootstrap.min.css">
	<script src="/js/plugins/jquery/jquery.min.js"></script>
	<link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
	<link rel="stylesheet" href="/css/reset.css"/>
	<link rel="stylesheet" href="/css/myProfiles.css"/>
	<link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
	<script src="/js/plugins/jrender/jrender.min.js"></script>
	<script src="/js/plugins/dialog2/dialog.min.js"></script>
	<script src="/js/common.js"></script>


	<script type="application/javascript">
        $(function () {
            //从sessionStorage中获取当前登录用户
            var user = JSON.parse(sessionStorage.getItem("user"));
            //渲染数据
            $(".info").renderValues(user,{
                getHref:getHref
			});

            //获取当前用户的积分
            $.get("/exchanges",function (data) {
                //console.log(data);
                $(".points").renderValues(data);
            })

			//获取所有商品
			$.get("/commodities",function (data) {
                //console.log(data);
                $('.commodities').renderValues(data,{
                    getHref:getHref
				});
            })
        })
	</script>

</head>

<body>
<div class="nav-search">
	<a href="/index.html">
		<span><i class="fa fa-angle-left fa-2x"></i></span>
	</a>
</div>
<hr/>
<div class="container">
	<div class="row info">
		<div class="col-2" style="margin-right: 25px;">
			<a data-href="../userProfiles.html?userId=" render-key="id" render-fun="getHref">
				<img class="rounded-circle" render-src="headImgUrl">
			</a>
		</div>
		<div class="col-8">
			<h5 render-html="nickName"></h5>
		</div>
	</div>
</div>
<div class="row points">
	<div class="col-8">
		<h5 style="text-align: center">
			<small>当前积分 <span render-html="points"></span></small>
		</h5>
	</div>
</div>
<hr/>

<div class="row link-box">
	<div class="col">
		<ul class="list-inline">
			<li class="list-inline-item"><i class="fa fa-shopping-bag fa-2x"></i></li>
			<li class="list-inline-item">
				<h5>全部商品</h5>
			</li>
		</ul>
	</div>
</div>
<hr/>

<!--产品列表-->
<div class="tab-content" id="pills-tabContent">
	<div class="tab-pane fade active show" id="pills-top">

		<div class="container commodities">
			<div class="row hot" render-loop="list">
				<div class="col-4">
					<a class="commodity" data-href="/mine/commodity.html?id=" render-key="list.id" render-fun="getHref">
						<img render-src="list.picture" width="100%">
						<p render-html="list.name"></p>
						<p class="price"><em render-html="list.price"></em>积分</p>
					</a>

				</div>
			</div>
		</div>
	</div>
</div>

<!--底部按钮-->
<style>
	/* footer tool bar */
	.zw-tool-bar {
		position: fixed;
		z-index: 5;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 50px;
		background-color: #FFF;
		box-shadow: 0 -2.5px 4px rgba(0, 0, 0, 0.15);
		-webkit-box-shadow: 0 -2.5px 4px rgba(0, 0, 0, 0.15);
		-moz-box-shadow: 0 -2.5px 4px rgba(0, 0, 0, 0.15);
		-ms-box-shadow: 0 -2.5px 4px rgba(0, 0, 0, 0.15);
	}

	.zw-tool-bar > a {
		width: 33%;
		float: left;
		text-align: center;
		padding: 5px 0;
		line-height: 20px;
		color: #636363;
	}

	.zw-tool-bar > a .btn-tool-bar {
		font-size: 20px;
	}

	.zw-tool-bar > a .tool-bar-name {
		font-size: 13px;
	}

	.zw-tool-bar > a.active {
		color: #00B081;
	}

	.qui-footerBasic {
		margin: 0;
		padding: 20px 0 60px 0;
		background-color: #F5F5F5;
	}

	.qui-asideTool {
		margin-bottom: 50px !important;
	}
</style>

<section class="zw-tool-bar">
	<a href="https://m.qyer.com/z/destination">
		<span class="zwui-iconfont icon-local2 btn-tool-bar btn-tool-bar-destination"></span>
		<p class="tool-bar-name">我的兑换</p>
	</a>
	<a href="https://m.qyer.com/passport/login?ref=%2F%2Fm.qyer.com%2Fu%2F">
		<span class="zwui-iconfont icon-my btn-tool-bar btn-tool-bar-my"></span>
		<p id="goodsCollect" class="tool-bar-name">商品收藏</p>
	</a>
	<a href="/mine/profiles.html" class="active">
		<span class="zwui-iconfont icon-home btn-tool-bar btn-tool-bar-home"></span>
		<p class="tool-bar-name">返回上一页</p>
	</a>
</section>

</body>

</html>